﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Kovan.UI.Areas.Manage.Controllers
{
    public class PermissionsAttribute : ActionFilterAttribute
    {
        /// <summary>
        /// Action执行前执行此方法
        /// </summary>
        /// <param name="filterContext">filterContext</param>
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            //try
            //{
            //    var controllerName = filterContext.Controller.ControllerContext.RouteData.Values["controller"].ToString();
            //    if (!BarfooControllerBase.HaveMenu(controllerName))
            //    {
            //        filterContext.HttpContext.Response.Redirect(PageUtility.AppPath + "/account/login");
            //    }
            //}
            //catch
            //{
            //    filterContext.HttpContext.Response.Redirect(PageUtility.AppPath + "/account/login");
            //}
        }
    }
}